Designing Incremental Rotary Encoders With Hall-Effect Sensors